<!-- 数字地图-轨迹查看-数据查询 -->
<template>
  <div class="JNPF-common-layout">
    <div class="JNPF-common-layout-center">
      <el-row class="JNPF-common-search-box" :gutter="16">
        <el-form @submit.native.prevent>

          <el-col :span="8">
            <el-form-item label="日期">
              <el-date-picker v-model="fbillcredate" type="daterange" value-format="yyyy-MM-dd" range-separator="至"
                start-placeholder="开始日期" end-placeholder="结束日期">
              </el-date-picker>
            </el-form-item>
          </el-col>

          <el-col :span="6">
            <el-form-item label="所属教学楼">
              <el-select v-model="listQuery.fcustomno" placeholder="请选择"
                :disabled="$store.getters.userInfo.manufacturer">
                <el-option
                  v-for="item in options1"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value">
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>


          <template v-if="showAll">

            <el-col :span="6">
            <el-form-item label="定位卡编号">
              <el-input v-model="listQuery.fuser" placeholder="请输入定位卡编号" clearable />
            </el-form-item>
          </el-col>

          <el-col :span="6">
            <el-form-item label="手机号码">
              <el-input v-model="listQuery.fuser" placeholder="请输入手机号" clearable />
            </el-form-item>
          </el-col>


          <el-col :span="6">
            <el-form-item label="所属楼层">
              <el-select v-model="listQuery.fcustomno" placeholder="请选择"
                :disabled="$store.getters.userInfo.manufacturer">
                <el-option
                  v-for="item in options2"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value">
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>

          <el-col :span="6">
            <el-form-item label="场地名称">
              <el-input v-model="listQuery.fpoint" placeholder="请输入场地名称" clearable />
            </el-form-item>
          </el-col>

          </template>

          <el-col :span="6">
            <el-form-item label="">
              <el-button type="primary" icon="el-icon-search" >查询</el-button>
              <el-button type="danger" icon="el-icon-download">导出</el-button>
              <el-button type="text" icon="el-icon-arrow-down" @click="showAll = true" v-if="!showAll">展开</el-button>
              <el-button type="text" icon="el-icon-arrow-up" @click="showAll = false" v-else>
                收起</el-button>
            </el-form-item>
          </el-col>
        </el-form>
      </el-row>

      <div class="JNPF-common-layout-main JNPF-flex-main">
        <JNPF-table :data="list" border v-loading="loading">
          <el-table-column prop="FCARDTIME" label="记录日期" ></el-table-column>
          <el-table-column prop="FGRAND" label="教学楼" ></el-table-column>
          <el-table-column prop="FADDRES" label="场地名称"></el-table-column>
          <el-table-column prop="FUSER" label="人员姓名"  ></el-table-column>
          <el-table-column prop="FUSERTYPE" label="人员身份" ></el-table-column>
          <el-table-column prop="FCARDNO" label="定位卡编号"  ></el-table-column>
          <el-table-column prop="FBEGTIME" label="进入时间"  ></el-table-column>
          <el-table-column prop="FENDTIME" label="离开时间"  ></el-table-column>
          <el-table-column prop="FUSETIME" label="停留时间"  ></el-table-column>
        </JNPF-table>
        <pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit"/>
      </div>
    </div>
  </div>
</template>
<script>
  import jnpf from "@/utils/jnpf"
  export default {
    name: 'shop',
    components: {  },
    data() {
      return {
        showAll: false,

        //所属教学楼选择数据
        options1: [{
          value: '20E01',
          label: '第一教学楼'
        }, {
          value: '20E02',
          label: '第二教学楼'
        }, {
          value: '20N01',
          label: '第一实验楼'
        }, {
          value: '20N02',
          label: '第二实验楼'
        }],

        //所属楼层选择数据
        options2: [{
          value: '20E01',
          label: '一楼'
        }, {
          value: '20E02',
          label: '二楼'
        }, {
          value: '20N01',
          label: '三楼'
        }, {
          value: '20N02',
          label: '四楼'
        }],
        
        customlist:[
          {
            "FBILLNO":"",
            "FBILLCREDATE":"2024-11-03",
            "FHOME":"化学与材料科学学院",
            "FUSER":"曹操",
            "FCATNAME":"医疗垃圾智慧处理系统",
            "FTEACH":"秦始皇",
            "FWEEK":"3个月",
            "FBEGDATE":"2025-02-01",
            "FENDDATE":"2025-04-30",
            "FMONEY":"10万",
            "FBILLSTATE":"申请中"
          },
        ],
        list: [
            {
            "FBILLCREDATE":"2024-12-05",
            "FCARDNO": "E-D-901", 
            "FUSER":"李逵",
            "FUSERTYPE":"外来人员",
            "FCARDTIME":"2024-12-05",
            "FGRAND":"奉化学楼",
            "FADDRES":"奉化学楼101",
            "FBEGTIME":"09:01:03",
            "FENDTIME":"11:02:31",
            "FUSETIME":"2个小时"
            },{
            "FBILLCREDATE":"2024-12-05",
            "FCARDNO": "E-D-902", 
            "FUSER":"柴荣",
            "FUSERTYPE":"外来人员",
            "FCARDTIME":"2024-12-05",
            "FGRAND":"奉化学楼",
            "FADDRES":"奉化学楼101",
            "FBEGTIME":"09:01:03",
            "FENDTIME":"11:02:31",
            "FUSETIME":"2个小时"
            },
            ,{
            "FBILLCREDATE":"2024-12-05",
            "FCARDNO": "E-D-110", 
            "FUSER":"曹操",
            "FUSERTYPE":"本院人员",
            "FCARDTIME":"2024-12-05",
            "FGRAND":"奉综合实验楼",
            "FADDRES":"奉实验楼301",
            "FBEGTIME":"09:01:03",
            "FENDTIME":"11:02:31",
            "FUSETIME":"2个小时"
            },{
            "FBILLCREDATE":"2024-12-05",
            "FCARDNO": "E-D-112", 
            "FUSER":"曹植",
            "FUSERTYPE":"本院人员",
            "FCARDTIME":"2024-12-05",
            "FGRAND":"奉3教楼",
            "FADDRES":"奉实验楼301",
            "FBEGTIME":"09:01:03",
            "FENDTIME":"11:02:31",
            "FUSETIME":"2个小时"
            },
        ],
        fbillcredate: [jnpf.dateFormat(new Date(), "YYYY-MM-DD"), jnpf.dateFormat(new Date(), "YYYY-MM-DD")],
        loading: false,
        total: 0,
        listQuery: {
          page: 1,
          limit: 20,
          sort: "desc",
          sidx: "",
          fbillstate: "",
          fbillno: "",
          begindate: undefined,
          enddate: undefined,
          fcustomno: ""
        },
      };
    },
    computed: {},
    methods: {

    },
  };
</script>